<%= page_title "Deploy Groups" %>

<section class="clearfix tabs">
  <div class="table table-hover table-condensed">
    <table class="table">
      <thead>
        <tr>
          <th>Name</th>
          <th>Environment</th>
          <th>$DEPLOY_GROUPS</th>
          <%= Samson::Hooks.render_views(:deploy_group_table_header, self) %>
          <th>Actions</th>
        </tr>
      </thead>

      <tbody>
        <% @deploy_groups.each do |deploy_group| %>
          <tr>
            <td><%= link_to deploy_group.name, deploy_group %></td>
            <td><%= link_to deploy_group.environment.name, deploy_group.environment %></td>
            <td><%= deploy_group.env_value %></td>
            <%= Samson::Hooks.render_views(:deploy_group_table_cell, self, deploy_group: deploy_group) %>
            <td>
              <%= link_to "Edit", edit_deploy_group_path(deploy_group) %>
              |
              <%= link_to_delete(deploy_group) %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>

  <div class="admin-actions">
    <div class="pull-right">
      <%= link_to "New", new_deploy_group_path, class: "btn btn-default" %>
    </div>
  </div>
</section>
